<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>XenC: include/kenlm/util/double-conversion/ieee.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XenC
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Open-source tool for data selection in NLP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_5417fc49d29c4cfca6bc3f52c9c7deba.html">kenlm</a></li><li class="navelem"><a class="el" href="dir_9ec25de6763e2dc47109730f881b7e3e.html">util</a></li><li class="navelem"><a class="el" href="dir_5fd0dc67f55ed56e6f450361f3921d3b.html">double-conversion</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ieee.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ieee_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// Copyright 2012 the V8 project authors. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// modification, are permitted provided that the following conditions are</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// met:</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//     * Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">//       notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">//     * Redistributions in binary form must reproduce the above</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">//       copyright notice, this list of conditions and the following</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">//       disclaimer in the documentation and/or other materials provided</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//       with the distribution.</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">//     * Neither the name of Google Inc. nor the names of its</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">//       contributors may be used to endorse or promote products derived</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//       from this software without specific prior written permission.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#ifndef DOUBLE_CONVERSION_DOUBLE_H_</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#define DOUBLE_CONVERSION_DOUBLE_H_</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="diy-fp_8h.html">diy-fp.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacedouble__conversion.html">double_conversion</a> {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">// We assume that doubles and uint64_t have the same endianness.</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="namespacedouble__conversion.html#acc466e0dcfce09778e11409906a75e6d">   36</a></span>&#160;<span class="keyword">static</span> uint64_t <a class="code" href="namespacedouble__conversion.html#acc466e0dcfce09778e11409906a75e6d">double_to_uint64</a>(<span class="keywordtype">double</span> d) { <span class="keywordflow">return</span> BitCast&lt;uint64_t&gt;(d); }</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="namespacedouble__conversion.html#ac05f6b527a8827fae33ca10fa536c979">   37</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="namespacedouble__conversion.html#ac05f6b527a8827fae33ca10fa536c979">uint64_to_double</a>(uint64_t d64) { <span class="keywordflow">return</span> BitCast&lt;double&gt;(d64); }</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="namespacedouble__conversion.html#a907211671713ddf4ebe91cfa3899e91b">   38</a></span>&#160;<span class="keyword">static</span> uint32_t <a class="code" href="namespacedouble__conversion.html#a907211671713ddf4ebe91cfa3899e91b">float_to_uint32</a>(<span class="keywordtype">float</span> f) { <span class="keywordflow">return</span> BitCast&lt;uint32_t&gt;(f); }</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespacedouble__conversion.html#a1164e4dbf11e5136da36a51029bba702">   39</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">float</span> <a class="code" href="namespacedouble__conversion.html#a1164e4dbf11e5136da36a51029bba702">uint32_to_float</a>(uint32_t d32) { <span class="keywordflow">return</span> BitCast&lt;float&gt;(d32); }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">// Helper functions for doubles.</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html">   42</a></span>&#160;<span class="keyword">class </span><a class="code" href="classdouble__conversion_1_1_double.html">Double</a> {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a7888821c975e330ee2dfafd15695b5da">   44</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#a7888821c975e330ee2dfafd15695b5da">kSignMask</a> = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x80000000, 00000000);</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">   45</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a> = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x7FF00000, 00000000);</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">   46</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a> = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x000FFFFF, FFFFFFFF);</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">   47</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">kHiddenBit</a> = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x00100000, 00000000);</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">   48</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">kPhysicalSignificandSize</a> = 52;  <span class="comment">// Excludes the hidden bit.</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">   49</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">kSignificandSize</a> = 53;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">   51</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>() : d64_(0) {}</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#adb11a44dc71e53359b90f2ecb16cff69">   52</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classdouble__conversion_1_1_double.html#adb11a44dc71e53359b90f2ecb16cff69">Double</a>(<span class="keywordtype">double</span> d) : d64_(<a class="code" href="namespacedouble__conversion.html#acc466e0dcfce09778e11409906a75e6d">double_to_uint64</a>(d)) {}</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a71f23d381695413685eca4330f7045bf">   53</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classdouble__conversion_1_1_double.html#a71f23d381695413685eca4330f7045bf">Double</a>(uint64_t d64) : d64_(d64) {}</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#ae872c45167dfee618b5968c64311a915">   54</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classdouble__conversion_1_1_double.html#ae872c45167dfee618b5968c64311a915">Double</a>(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> diy_fp)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    : d64_(DiyFpToUint64(diy_fp)) {}</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="comment">// The value encoded by this Double must be greater or equal to +0.0.</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="comment">// It must not be special (infinity, or NaN).</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#aa6d20ebb68d96990e922d88121a04596">   59</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> <a class="code" href="classdouble__conversion_1_1_double.html#aa6d20ebb68d96990e922d88121a04596">AsDiyFp</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &gt; 0);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(!<a class="code" href="classdouble__conversion_1_1_double.html#abc2b742268e87fa1e1a159c0dffc58ee">IsSpecial</a>());</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>(), <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>());</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// The value encoded by this Double must be strictly greater than 0.</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#ab5fbb6fae81be5e8a781eb1170acb9fa">   66</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> <a class="code" href="classdouble__conversion_1_1_double.html#ab5fbb6fae81be5e8a781eb1170acb9fa">AsNormalizedDiyFp</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">value</a>() &gt; 0.0);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    uint64_t f = <a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>();</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordtype">int</span> e = <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>();</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">// The current double could be a denormal.</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">while</span> ((f &amp; kHiddenBit) == 0) {</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      f &lt;&lt;= 1;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      e--;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="comment">// Do the final shifts in one go.</span></div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    f &lt;&lt;= <a class="code" href="classdouble__conversion_1_1_diy_fp.html#ae34c561a7915ffd25adaf62f4e673289">DiyFp::kSignificandSize</a> - <a class="code" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">kSignificandSize</a>;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    e -= <a class="code" href="classdouble__conversion_1_1_diy_fp.html#ae34c561a7915ffd25adaf62f4e673289">DiyFp::kSignificandSize</a> - <a class="code" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">kSignificandSize</a>;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>(f, e);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="comment">// Returns the double&#39;s bit as uint64.</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">   83</a></span>&#160;  uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">return</span> d64_;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <span class="comment">// Returns the next greater double. Returns +infinity on input +infinity.</span></div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a251101fa9caa9dc0bbe3f810a746a3ce">   88</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classdouble__conversion_1_1_double.html#a251101fa9caa9dc0bbe3f810a746a3ce">NextDouble</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">if</span> (d64_ == kInfinity) <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(kInfinity).value();</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &lt; 0 &amp;&amp; <a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>() == 0) {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      <span class="comment">// -0.0</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      <span class="keywordflow">return</span> 0.0;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    }</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &lt; 0) {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(d64_ - 1).value();</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(d64_ + 1).value();</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a4a7a969f8f8617c19c0f00290a884a71">  101</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classdouble__conversion_1_1_double.html#a4a7a969f8f8617c19c0f00290a884a71">PreviousDouble</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">if</span> (d64_ == (kInfinity | kSignMask)) <span class="keywordflow">return</span> -<a class="code" href="classdouble__conversion_1_1_double.html#a37e78df9cfbfa269e731be1302605f76">Double::Infinity</a>();</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &lt; 0) {</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(d64_ + 1).value();</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>() == 0) <span class="keywordflow">return</span> -0.0;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(d64_ - 1).value();</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  }</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">  111</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">IsDenormal</a>()) <span class="keywordflow">return</span> kDenormalExponent;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordtype">int</span> biased_e =</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>((d64 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a>) &gt;&gt; kPhysicalSignificandSize);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">return</span> biased_e - kExponentBias;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  }</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">  120</a></span>&#160;  uint64_t <a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    uint64_t significand = d64 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">IsDenormal</a>()) {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="keywordflow">return</span> significand + <a class="code" href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">kHiddenBit</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      <span class="keywordflow">return</span> significand;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  }</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="comment">// Returns true if the double is a denormal.</span></div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">  131</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">IsDenormal</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">return</span> (d64 &amp; kExponentMask) == 0;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="comment">// We consider denormals not to be special.</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="comment">// Hence only Infinity and NaN are special.</span></div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#abc2b742268e87fa1e1a159c0dffc58ee">  138</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_double.html#abc2b742268e87fa1e1a159c0dffc58ee">IsSpecial</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">return</span> (d64 &amp; kExponentMask) == <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a9fbcea5d90dc88b4655688d85078785e">  143</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_double.html#a9fbcea5d90dc88b4655688d85078785e">IsNan</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keywordflow">return</span> ((d64 &amp; kExponentMask) == kExponentMask) &amp;&amp;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        ((d64 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) != 0);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#ae2390c73e11271cc65fa013dc40fadbe">  149</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_double.html#ae2390c73e11271cc65fa013dc40fadbe">IsInfinite</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordflow">return</span> ((d64 &amp; kExponentMask) == kExponentMask) &amp;&amp;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        ((d64 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) == 0);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">  155</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    uint64_t d64 = <a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>();</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">return</span> (d64 &amp; kSignMask) == 0? 1: -1;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  }</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  <span class="comment">// Precondition: the value encoded by this Double must be greater or equal</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  <span class="comment">// than +0.0.</span></div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a92f0f0e6cca6b6c6dbf06eda102825d6">  162</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> <a class="code" href="classdouble__conversion_1_1_double.html#a92f0f0e6cca6b6c6dbf06eda102825d6">UpperBoundary</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &gt; 0);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>() * 2 + 1, <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>() - 1);</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  <span class="comment">// Computes the two boundaries of this.</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  <span class="comment">// The bigger boundary (m_plus) is normalized. The lower boundary has the same</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  <span class="comment">// exponent as m_plus.</span></div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  <span class="comment">// Precondition: the value encoded by this Double must be greater than 0.</span></div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a8b40e18c1c3b309a5161c8895c640e51">  171</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classdouble__conversion_1_1_double.html#a8b40e18c1c3b309a5161c8895c640e51">NormalizedBoundaries</a>(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>* out_m_minus, <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>* out_m_plus)<span class="keyword"> const </span>{</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">value</a>() &gt; 0.0);</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> v = this-&gt;<a class="code" href="classdouble__conversion_1_1_double.html#aa6d20ebb68d96990e922d88121a04596">AsDiyFp</a>();</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> m_plus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html#a4fbfaf1d1b9410c859fd39df80c36078">DiyFp::Normalize</a>(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 1) + 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 1));</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> m_minus;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#a67732f15bf4b75886b8a43f348df7cdc">LowerBoundaryIsCloser</a>()) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;      m_minus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 2) - 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 2);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;      m_minus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 1) - 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 1);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    }</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a84282d3c5634034954c327f92d65a5fb">set_f</a>(m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; (m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - m_plus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>()));</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a41dcddbfa08269666b7f58c1fdcdb01c">set_e</a>(m_plus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>());</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    *out_m_plus = m_plus;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    *out_m_minus = m_minus;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  }</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a67732f15bf4b75886b8a43f348df7cdc">  187</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_double.html#a67732f15bf4b75886b8a43f348df7cdc">LowerBoundaryIsCloser</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="comment">// The boundary is closer if the significand is of the form f == 2^p-1 then</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="comment">// the lower boundary is closer.</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="comment">// Think of v = 1000e10 and v- = 9999e9.</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="comment">// Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="comment">// at a distance of 1e8.</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="comment">// The only exception is for the smallest normal: the largest denormal is</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="comment">// at the same distance as its successor.</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="comment">// Note: denormals have the same exponent as the smallest normals.</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordtype">bool</span> physical_significand_is_zero = ((<a class="code" href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">AsUint64</a>() &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) == 0);</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordflow">return</span> physical_significand_is_zero &amp;&amp; (<a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>() != kDenormalExponent);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  }</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">  200</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacedouble__conversion.html#ac05f6b527a8827fae33ca10fa536c979">uint64_to_double</a>(d64_); }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="comment">// Returns the significand size for a given order of magnitude.</span></div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="comment">// If v = f*2^e with 2^p-1 &lt;= f &lt;= 2^p then p+e is v&#39;s order of magnitude.</span></div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  <span class="comment">// This function returns the number of significant binary digits v will have</span></div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <span class="comment">// once it&#39;s encoded into a double. In almost all cases this is equal to</span></div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  <span class="comment">// kSignificandSize. The only exceptions are denormals. They start with</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  <span class="comment">// leading zeroes and their effective significand-size is hence smaller.</span></div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a87143580c39837a721d780b5931202d7">  208</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#a87143580c39837a721d780b5931202d7">SignificandSizeForOrderOfMagnitude</a>(<span class="keywordtype">int</span> order) {</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordflow">if</span> (order &gt;= (kDenormalExponent + kSignificandSize)) {</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;      <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">kSignificandSize</a>;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    }</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">if</span> (order &lt;= kDenormalExponent) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordflow">return</span> order - kDenormalExponent;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  }</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#a37e78df9cfbfa269e731be1302605f76">  216</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classdouble__conversion_1_1_double.html#a37e78df9cfbfa269e731be1302605f76">Infinity</a>() {</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(kInfinity).value();</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  }</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_double.html#ae41a1712f37d352dc7e8134ba7679618">  220</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classdouble__conversion_1_1_double.html#ae41a1712f37d352dc7e8134ba7679618">NaN</a>() {</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">Double</a>(kNaN).value();</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  }</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kExponentBias = 0x3FF + <a class="code" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">kPhysicalSignificandSize</a>;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kDenormalExponent = -kExponentBias + 1;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kMaxExponent = 0x7FF - kExponentBias;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t kInfinity = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x7FF00000, 00000000);</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint64_t kNaN = <a class="code" href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a>(0x7FF80000, 00000000);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <span class="keyword">const</span> uint64_t d64_;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="keyword">static</span> uint64_t DiyFpToUint64(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> diy_fp) {</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    uint64_t significand = diy_fp.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>();</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordtype">int</span> exponent = diy_fp.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>();</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordflow">while</span> (significand &gt; kHiddenBit + kSignificandMask) {</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;      significand &gt;&gt;= 1;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;      exponent++;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordflow">if</span> (exponent &gt;= kMaxExponent) {</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;      <span class="keywordflow">return</span> kInfinity;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    }</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="keywordflow">if</span> (exponent &lt; kDenormalExponent) {</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;      <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    }</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">while</span> (exponent &gt; kDenormalExponent &amp;&amp; (significand &amp; kHiddenBit) == 0) {</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;      significand &lt;&lt;= 1;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;      exponent--;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    uint64_t biased_exponent;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keywordflow">if</span> (exponent == kDenormalExponent &amp;&amp; (significand &amp; kHiddenBit) == 0) {</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;      biased_exponent = 0;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;      biased_exponent = <span class="keyword">static_cast&lt;</span>uint64_t<span class="keyword">&gt;</span>(exponent + kExponentBias);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    }</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">return</span> (significand &amp; kSignificandMask) |</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        (biased_exponent &lt;&lt; <a class="code" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">kPhysicalSignificandSize</a>);</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  }</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;};</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html">  261</a></span>&#160;<span class="keyword">class </span><a class="code" href="classdouble__conversion_1_1_single.html">Single</a> {</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#aceec72a9898d803d32101e5eb58884d6">  263</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t <a class="code" href="classdouble__conversion_1_1_double.html#a7888821c975e330ee2dfafd15695b5da">kSignMask</a> = 0x80000000;</div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a06634dcdbd92efeaca3cafd75f2a527d">  264</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a> = 0x7F800000;</div><div class="line"><a name="l00265"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a11e156089bc6ee558e26650329b6810f">  265</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a> = 0x007FFFFF;</div><div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ae789f495a0ac4cd5765afbc84b2033ae">  266</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t <a class="code" href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">kHiddenBit</a> = 0x00800000;</div><div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ae7d04bed07ca89ac36ea191322458312">  267</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">kPhysicalSignificandSize</a> = 23;  <span class="comment">// Excludes the hidden bit.</span></div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#adb4ee44408372c4c0ab277891a99475b">  268</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">kSignificandSize</a> = 24;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a3b83a3b8757081c14e1de69a2c92c41d">  270</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_single.html#a3b83a3b8757081c14e1de69a2c92c41d">Single</a>() : d32_(0) {}</div><div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a15a2145f28721f6627753283ff1327ca">  271</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classdouble__conversion_1_1_single.html#a15a2145f28721f6627753283ff1327ca">Single</a>(<span class="keywordtype">float</span> f) : d32_(<a class="code" href="namespacedouble__conversion.html#a907211671713ddf4ebe91cfa3899e91b">float_to_uint32</a>(f)) {}</div><div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a6ea38028bc99c784704bfc0003e9deed">  272</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classdouble__conversion_1_1_single.html#a6ea38028bc99c784704bfc0003e9deed">Single</a>(uint32_t d32) : d32_(d32) {}</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  <span class="comment">// The value encoded by this Single must be greater or equal to +0.0.</span></div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="comment">// It must not be special (infinity, or NaN).</span></div><div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a3ccf8c9e903e38a343d21659af3ce2bf">  276</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> <a class="code" href="classdouble__conversion_1_1_single.html#a3ccf8c9e903e38a343d21659af3ce2bf">AsDiyFp</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &gt; 0);</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(!<a class="code" href="classdouble__conversion_1_1_double.html#abc2b742268e87fa1e1a159c0dffc58ee">IsSpecial</a>());</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>(), <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>());</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  }</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="comment">// Returns the single&#39;s bit as uint64.</span></div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a22c422d0c69624a34d530aa9ac8ec6d6">  283</a></span>&#160;  uint32_t <a class="code" href="classdouble__conversion_1_1_single.html#a22c422d0c69624a34d530aa9ac8ec6d6">AsUint32</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">return</span> d32_;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  }</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ab41f4c175f0ae26d0073f44145e5a2cc">  287</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_single.html#ab41f4c175f0ae26d0073f44145e5a2cc">Exponent</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">IsDenormal</a>()) <span class="keywordflow">return</span> kDenormalExponent;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordtype">int</span> biased_e =</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>((d32 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a>) &gt;&gt; kPhysicalSignificandSize);</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">return</span> biased_e - kExponentBias;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  }</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#adeccca5c385d6e8348ead14d6e418f7d">  296</a></span>&#160;  uint32_t <a class="code" href="classdouble__conversion_1_1_single.html#adeccca5c385d6e8348ead14d6e418f7d">Significand</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    uint32_t significand = d32 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">IsDenormal</a>()) {</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;      <span class="keywordflow">return</span> significand + <a class="code" href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">kHiddenBit</a>;</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;      <span class="keywordflow">return</span> significand;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  }</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  <span class="comment">// Returns true if the single is a denormal.</span></div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#abb47affa9f009104f7240b5fe33de7c2">  307</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_single.html#abb47affa9f009104f7240b5fe33de7c2">IsDenormal</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keywordflow">return</span> (d32 &amp; kExponentMask) == 0;</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  }</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  <span class="comment">// We consider denormals not to be special.</span></div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;  <span class="comment">// Hence only Infinity and NaN are special.</span></div><div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#abb209c4f86b3bf0d3f32bf6e5007ea41">  314</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_single.html#abb209c4f86b3bf0d3f32bf6e5007ea41">IsSpecial</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <span class="keywordflow">return</span> (d32 &amp; kExponentMask) == <a class="code" href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">kExponentMask</a>;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;  }</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a0ee654a57b089e45b1bb2fc17a4e7d74">  319</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_single.html#a0ee654a57b089e45b1bb2fc17a4e7d74">IsNan</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    <span class="keywordflow">return</span> ((d32 &amp; kExponentMask) == kExponentMask) &amp;&amp;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        ((d32 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) != 0);</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;  }</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div><div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ad5dd2ddd20f13069a05bb317f6968e45">  325</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_single.html#ad5dd2ddd20f13069a05bb317f6968e45">IsInfinite</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="keywordflow">return</span> ((d32 &amp; kExponentMask) == kExponentMask) &amp;&amp;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        ((d32 &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) == 0);</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;  }</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;</div><div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#aee4aa60fbd48608c774e8e712ab0a2ed">  331</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classdouble__conversion_1_1_single.html#aee4aa60fbd48608c774e8e712ab0a2ed">Sign</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    uint32_t d32 = AsUint32();</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="keywordflow">return</span> (d32 &amp; kSignMask) == 0? 1: -1;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  }</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  <span class="comment">// Computes the two boundaries of this.</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;  <span class="comment">// The bigger boundary (m_plus) is normalized. The lower boundary has the same</span></div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;  <span class="comment">// exponent as m_plus.</span></div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  <span class="comment">// Precondition: the value encoded by this Single must be greater than 0.</span></div><div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ae9e8d15a9beef8ec82cf3ade30a64601">  340</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classdouble__conversion_1_1_single.html#ae9e8d15a9beef8ec82cf3ade30a64601">NormalizedBoundaries</a>(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>* out_m_minus, <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>* out_m_plus)<span class="keyword"> const </span>{</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">value</a>() &gt; 0.0);</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> v = this-&gt;<a class="code" href="classdouble__conversion_1_1_double.html#aa6d20ebb68d96990e922d88121a04596">AsDiyFp</a>();</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> m_plus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html#a4fbfaf1d1b9410c859fd39df80c36078">DiyFp::Normalize</a>(<a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 1) + 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 1));</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> m_minus;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classdouble__conversion_1_1_double.html#a67732f15bf4b75886b8a43f348df7cdc">LowerBoundaryIsCloser</a>()) {</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;      m_minus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 2) - 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 2);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;      m_minus = <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>((v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; 1) - 1, v.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - 1);</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    }</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a84282d3c5634034954c327f92d65a5fb">set_f</a>(m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">f</a>() &lt;&lt; (m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>() - m_plus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>()));</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    m_minus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a41dcddbfa08269666b7f58c1fdcdb01c">set_e</a>(m_plus.<a class="code" href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">e</a>());</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    *out_m_plus = m_plus;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    *out_m_minus = m_minus;</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;  }</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;  <span class="comment">// Precondition: the value encoded by this Single must be greater or equal</span></div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;  <span class="comment">// than +0.0.</span></div><div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a13fd3d2560ce5cd7bca7055fed5bdabc">  358</a></span>&#160;  <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a> <a class="code" href="classdouble__conversion_1_1_single.html#a13fd3d2560ce5cd7bca7055fed5bdabc">UpperBoundary</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    <a class="code" href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a>(<a class="code" href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">Sign</a>() &gt; 0);</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_diy_fp.html">DiyFp</a>(<a class="code" href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">Significand</a>() * 2 + 1, <a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>() - 1);</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  }</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ace039ddd219c9dd57b193efb58064d46">  363</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classdouble__conversion_1_1_single.html#ace039ddd219c9dd57b193efb58064d46">LowerBoundaryIsCloser</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    <span class="comment">// The boundary is closer if the significand is of the form f == 2^p-1 then</span></div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="comment">// the lower boundary is closer.</span></div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="comment">// Think of v = 1000e10 and v- = 9999e9.</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="comment">// Then the boundary (== (v - v-)/2) is not just at a distance of 1e9 but</span></div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="comment">// at a distance of 1e8.</span></div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    <span class="comment">// The only exception is for the smallest normal: the largest denormal is</span></div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="comment">// at the same distance as its successor.</span></div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="comment">// Note: denormals have the same exponent as the smallest normals.</span></div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    <span class="keywordtype">bool</span> physical_significand_is_zero = ((AsUint32() &amp; <a class="code" href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">kSignificandMask</a>) == 0);</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keywordflow">return</span> physical_significand_is_zero &amp;&amp; (<a class="code" href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">Exponent</a>() != kDenormalExponent);</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;  }</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;</div><div class="line"><a name="l00376"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#ae1d35445d269bc498edfdccf76240baa">  376</a></span>&#160;  <span class="keywordtype">float</span> <a class="code" href="classdouble__conversion_1_1_single.html#ae1d35445d269bc498edfdccf76240baa">value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacedouble__conversion.html#a1164e4dbf11e5136da36a51029bba702">uint32_to_float</a>(d32_); }</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#a69f97d248c4c2e3e26341d3f462365d3">  378</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">float</span> <a class="code" href="classdouble__conversion_1_1_single.html#a69f97d248c4c2e3e26341d3f462365d3">Infinity</a>() {</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_single.html">Single</a>(kInfinity).<a class="code" href="classdouble__conversion_1_1_single.html#ae1d35445d269bc498edfdccf76240baa">value</a>();</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;  }</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="classdouble__conversion_1_1_single.html#af42b643d620a241a94f796c9c8e76a28">  382</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">float</span> <a class="code" href="classdouble__conversion_1_1_single.html#af42b643d620a241a94f796c9c8e76a28">NaN</a>() {</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classdouble__conversion_1_1_single.html">Single</a>(kNaN).<a class="code" href="classdouble__conversion_1_1_single.html#ae1d35445d269bc498edfdccf76240baa">value</a>();</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;  }</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kExponentBias = 0x7F + <a class="code" href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">kPhysicalSignificandSize</a>;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kDenormalExponent = -kExponentBias + 1;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> kMaxExponent = 0xFF - kExponentBias;</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t kInfinity = 0x7F800000;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t kNaN = 0x7FC00000;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;  <span class="keyword">const</span> uint32_t d32_;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;};</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}  <span class="comment">// namespace double_conversion</span></div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="preprocessor">#endif  // DOUBLE_CONVERSION_DOUBLE_H_</span></div><div class="ttc" id="classdouble__conversion_1_1_double_html_a9fbcea5d90dc88b4655688d85078785e"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a9fbcea5d90dc88b4655688d85078785e">double_conversion::Double::IsNan</a></div><div class="ttdeci">bool IsNan() const </div><div class="ttdef"><b>Definition:</b> ieee.h:143</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a8b40e18c1c3b309a5161c8895c640e51"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a8b40e18c1c3b309a5161c8895c640e51">double_conversion::Double::NormalizedBoundaries</a></div><div class="ttdeci">void NormalizedBoundaries(DiyFp *out_m_minus, DiyFp *out_m_plus) const </div><div class="ttdef"><b>Definition:</b> ieee.h:171</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a22c422d0c69624a34d530aa9ac8ec6d6"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a22c422d0c69624a34d530aa9ac8ec6d6">double_conversion::Single::AsUint32</a></div><div class="ttdeci">uint32_t AsUint32() const </div><div class="ttdef"><b>Definition:</b> ieee.h:283</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a0ee654a57b089e45b1bb2fc17a4e7d74"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a0ee654a57b089e45b1bb2fc17a4e7d74">double_conversion::Single::IsNan</a></div><div class="ttdeci">bool IsNan() const </div><div class="ttdef"><b>Definition:</b> ieee.h:319</div></div>
<div class="ttc" id="utils_8h_html_a1dfb2cb545fa51edb2760047aa4ce45f"><div class="ttname"><a href="utils_8h.html#a1dfb2cb545fa51edb2760047aa4ce45f">ASSERT</a></div><div class="ttdeci">#define ASSERT(condition)        </div><div class="ttdef"><b>Definition:</b> utils.h:36</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_a3349d590fd9df99612cbc80139fedc58"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#a3349d590fd9df99612cbc80139fedc58">double_conversion::DiyFp::f</a></div><div class="ttdeci">uint64_t f() const </div><div class="ttdef"><b>Definition:</b> diy-fp.h:103</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a28532fcc57c79d85814bd34b0d20b4f5"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a28532fcc57c79d85814bd34b0d20b4f5">double_conversion::Double::kSignificandMask</a></div><div class="ttdeci">static const uint64_t kSignificandMask</div><div class="ttdef"><b>Definition:</b> ieee.h:46</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_aa6d20ebb68d96990e922d88121a04596"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#aa6d20ebb68d96990e922d88121a04596">double_conversion::Double::AsDiyFp</a></div><div class="ttdeci">DiyFp AsDiyFp() const </div><div class="ttdef"><b>Definition:</b> ieee.h:59</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_ad5dd2ddd20f13069a05bb317f6968e45"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#ad5dd2ddd20f13069a05bb317f6968e45">double_conversion::Single::IsInfinite</a></div><div class="ttdeci">bool IsInfinite() const </div><div class="ttdef"><b>Definition:</b> ieee.h:325</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a69f97d248c4c2e3e26341d3f462365d3"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a69f97d248c4c2e3e26341d3f462365d3">double_conversion::Single::Infinity</a></div><div class="ttdeci">static float Infinity()</div><div class="ttdef"><b>Definition:</b> ieee.h:378</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_a828bcae8911450e00323fd29f8846d75"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#a828bcae8911450e00323fd29f8846d75">double_conversion::DiyFp::e</a></div><div class="ttdeci">int e() const </div><div class="ttdef"><b>Definition:</b> diy-fp.h:104</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html">double_conversion::DiyFp</a></div><div class="ttdef"><b>Definition:</b> diy-fp.h:40</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_adb11a44dc71e53359b90f2ecb16cff69"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#adb11a44dc71e53359b90f2ecb16cff69">double_conversion::Double::Double</a></div><div class="ttdeci">Double(double d)</div><div class="ttdef"><b>Definition:</b> ieee.h:52</div></div>
<div class="ttc" id="namespacedouble__conversion_html_a907211671713ddf4ebe91cfa3899e91b"><div class="ttname"><a href="namespacedouble__conversion.html#a907211671713ddf4ebe91cfa3899e91b">double_conversion::float_to_uint32</a></div><div class="ttdeci">static uint32_t float_to_uint32(float f)</div><div class="ttdef"><b>Definition:</b> ieee.h:38</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_a4fbfaf1d1b9410c859fd39df80c36078"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#a4fbfaf1d1b9410c859fd39df80c36078">double_conversion::DiyFp::Normalize</a></div><div class="ttdeci">void Normalize()</div><div class="ttdef"><b>Definition:</b> diy-fp.h:77</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_ae2390c73e11271cc65fa013dc40fadbe"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#ae2390c73e11271cc65fa013dc40fadbe">double_conversion::Double::IsInfinite</a></div><div class="ttdeci">bool IsInfinite() const </div><div class="ttdef"><b>Definition:</b> ieee.h:149</div></div>
<div class="ttc" id="namespacedouble__conversion_html_ac05f6b527a8827fae33ca10fa536c979"><div class="ttname"><a href="namespacedouble__conversion.html#ac05f6b527a8827fae33ca10fa536c979">double_conversion::uint64_to_double</a></div><div class="ttdeci">static double uint64_to_double(uint64_t d64)</div><div class="ttdef"><b>Definition:</b> ieee.h:37</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_a41dcddbfa08269666b7f58c1fdcdb01c"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#a41dcddbfa08269666b7f58c1fdcdb01c">double_conversion::DiyFp::set_e</a></div><div class="ttdeci">void set_e(int new_value)</div><div class="ttdef"><b>Definition:</b> diy-fp.h:107</div></div>
<div class="ttc" id="utils_8h_html_af60c14e9c588537ba3fd925be39e29cd"><div class="ttname"><a href="utils_8h.html#af60c14e9c588537ba3fd925be39e29cd">UINT64_2PART_C</a></div><div class="ttdeci">#define UINT64_2PART_C(a, b)</div><div class="ttdef"><b>Definition:</b> utils.h:96</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_abb209c4f86b3bf0d3f32bf6e5007ea41"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#abb209c4f86b3bf0d3f32bf6e5007ea41">double_conversion::Single::IsSpecial</a></div><div class="ttdeci">bool IsSpecial() const </div><div class="ttdef"><b>Definition:</b> ieee.h:314</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a72610fddaeed3a34f135eed58d5b6a59"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a72610fddaeed3a34f135eed58d5b6a59">double_conversion::Double::IsDenormal</a></div><div class="ttdeci">bool IsDenormal() const </div><div class="ttdef"><b>Definition:</b> ieee.h:131</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_aef84a03f3860480c04a55a855d8c3a07"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#aef84a03f3860480c04a55a855d8c3a07">double_conversion::Double::Sign</a></div><div class="ttdeci">int Sign() const </div><div class="ttdef"><b>Definition:</b> ieee.h:155</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a71f23d381695413685eca4330f7045bf"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a71f23d381695413685eca4330f7045bf">double_conversion::Double::Double</a></div><div class="ttdeci">Double(uint64_t d64)</div><div class="ttdef"><b>Definition:</b> ieee.h:53</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_aa634c51b224638b8232b190e663d3c55"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#aa634c51b224638b8232b190e663d3c55">double_conversion::Double::AsUint64</a></div><div class="ttdeci">uint64_t AsUint64() const </div><div class="ttdef"><b>Definition:</b> ieee.h:83</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a37e78df9cfbfa269e731be1302605f76"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a37e78df9cfbfa269e731be1302605f76">double_conversion::Double::Infinity</a></div><div class="ttdeci">static double Infinity()</div><div class="ttdef"><b>Definition:</b> ieee.h:216</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_ab41f4c175f0ae26d0073f44145e5a2cc"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#ab41f4c175f0ae26d0073f44145e5a2cc">double_conversion::Single::Exponent</a></div><div class="ttdeci">int Exponent() const </div><div class="ttdef"><b>Definition:</b> ieee.h:287</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_afbe668d9b908d9f043eb7effca010b97"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#afbe668d9b908d9f043eb7effca010b97">double_conversion::Double::kPhysicalSignificandSize</a></div><div class="ttdeci">static const int kPhysicalSignificandSize</div><div class="ttdef"><b>Definition:</b> ieee.h:48</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a3b83a3b8757081c14e1de69a2c92c41d"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a3b83a3b8757081c14e1de69a2c92c41d">double_conversion::Single::Single</a></div><div class="ttdeci">Single()</div><div class="ttdef"><b>Definition:</b> ieee.h:270</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a13fd3d2560ce5cd7bca7055fed5bdabc"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a13fd3d2560ce5cd7bca7055fed5bdabc">double_conversion::Single::UpperBoundary</a></div><div class="ttdeci">DiyFp UpperBoundary() const </div><div class="ttdef"><b>Definition:</b> ieee.h:358</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a3ccf8c9e903e38a343d21659af3ce2bf"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a3ccf8c9e903e38a343d21659af3ce2bf">double_conversion::Single::AsDiyFp</a></div><div class="ttdeci">DiyFp AsDiyFp() const </div><div class="ttdef"><b>Definition:</b> ieee.h:276</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a4a7a969f8f8617c19c0f00290a884a71"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a4a7a969f8f8617c19c0f00290a884a71">double_conversion::Double::PreviousDouble</a></div><div class="ttdeci">double PreviousDouble() const </div><div class="ttdef"><b>Definition:</b> ieee.h:101</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_a84282d3c5634034954c327f92d65a5fb"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#a84282d3c5634034954c327f92d65a5fb">double_conversion::DiyFp::set_f</a></div><div class="ttdeci">void set_f(uint64_t new_value)</div><div class="ttdef"><b>Definition:</b> diy-fp.h:106</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_ade1ca44ef9c0cb94a3d10b065e55fb58"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#ade1ca44ef9c0cb94a3d10b065e55fb58">double_conversion::Double::kHiddenBit</a></div><div class="ttdeci">static const uint64_t kHiddenBit</div><div class="ttdef"><b>Definition:</b> ieee.h:47</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_ae1d35445d269bc498edfdccf76240baa"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#ae1d35445d269bc498edfdccf76240baa">double_conversion::Single::value</a></div><div class="ttdeci">float value() const </div><div class="ttdef"><b>Definition:</b> ieee.h:376</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_ae41a1712f37d352dc7e8134ba7679618"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#ae41a1712f37d352dc7e8134ba7679618">double_conversion::Double::NaN</a></div><div class="ttdeci">static double NaN()</div><div class="ttdef"><b>Definition:</b> ieee.h:220</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a251101fa9caa9dc0bbe3f810a746a3ce"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a251101fa9caa9dc0bbe3f810a746a3ce">double_conversion::Double::NextDouble</a></div><div class="ttdeci">double NextDouble() const </div><div class="ttdef"><b>Definition:</b> ieee.h:88</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_abb47affa9f009104f7240b5fe33de7c2"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#abb47affa9f009104f7240b5fe33de7c2">double_conversion::Single::IsDenormal</a></div><div class="ttdeci">bool IsDenormal() const </div><div class="ttdef"><b>Definition:</b> ieee.h:307</div></div>
<div class="ttc" id="namespacedouble__conversion_html_acc466e0dcfce09778e11409906a75e6d"><div class="ttname"><a href="namespacedouble__conversion.html#acc466e0dcfce09778e11409906a75e6d">double_conversion::double_to_uint64</a></div><div class="ttdeci">static uint64_t double_to_uint64(double d)</div><div class="ttdef"><b>Definition:</b> ieee.h:36</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a87143580c39837a721d780b5931202d7"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a87143580c39837a721d780b5931202d7">double_conversion::Double::SignificandSizeForOrderOfMagnitude</a></div><div class="ttdeci">static int SignificandSizeForOrderOfMagnitude(int order)</div><div class="ttdef"><b>Definition:</b> ieee.h:208</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_ab5fbb6fae81be5e8a781eb1170acb9fa"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#ab5fbb6fae81be5e8a781eb1170acb9fa">double_conversion::Double::AsNormalizedDiyFp</a></div><div class="ttdeci">DiyFp AsNormalizedDiyFp() const </div><div class="ttdef"><b>Definition:</b> ieee.h:66</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_abc2b742268e87fa1e1a159c0dffc58ee"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#abc2b742268e87fa1e1a159c0dffc58ee">double_conversion::Double::IsSpecial</a></div><div class="ttdeci">bool IsSpecial() const </div><div class="ttdef"><b>Definition:</b> ieee.h:138</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html"><div class="ttname"><a href="classdouble__conversion_1_1_double.html">double_conversion::Double</a></div><div class="ttdef"><b>Definition:</b> ieee.h:42</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a82d4fbb98a3beb4410eed342cca9077a"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a82d4fbb98a3beb4410eed342cca9077a">double_conversion::Double::Significand</a></div><div class="ttdeci">uint64_t Significand() const </div><div class="ttdef"><b>Definition:</b> ieee.h:120</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_ae872c45167dfee618b5968c64311a915"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#ae872c45167dfee618b5968c64311a915">double_conversion::Double::Double</a></div><div class="ttdeci">Double(DiyFp diy_fp)</div><div class="ttdef"><b>Definition:</b> ieee.h:54</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_adeccca5c385d6e8348ead14d6e418f7d"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#adeccca5c385d6e8348ead14d6e418f7d">double_conversion::Single::Significand</a></div><div class="ttdeci">uint32_t Significand() const </div><div class="ttdef"><b>Definition:</b> ieee.h:296</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a92f0f0e6cca6b6c6dbf06eda102825d6"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a92f0f0e6cca6b6c6dbf06eda102825d6">double_conversion::Double::UpperBoundary</a></div><div class="ttdeci">DiyFp UpperBoundary() const </div><div class="ttdef"><b>Definition:</b> ieee.h:162</div></div>
<div class="ttc" id="namespacedouble__conversion_html_a1164e4dbf11e5136da36a51029bba702"><div class="ttname"><a href="namespacedouble__conversion.html#a1164e4dbf11e5136da36a51029bba702">double_conversion::uint32_to_float</a></div><div class="ttdeci">static float uint32_to_float(uint32_t d32)</div><div class="ttdef"><b>Definition:</b> ieee.h:39</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_af42b643d620a241a94f796c9c8e76a28"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#af42b643d620a241a94f796c9c8e76a28">double_conversion::Single::NaN</a></div><div class="ttdeci">static float NaN()</div><div class="ttdef"><b>Definition:</b> ieee.h:382</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_aee4aa60fbd48608c774e8e712ab0a2ed"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#aee4aa60fbd48608c774e8e712ab0a2ed">double_conversion::Single::Sign</a></div><div class="ttdeci">int Sign() const </div><div class="ttdef"><b>Definition:</b> ieee.h:331</div></div>
<div class="ttc" id="diy-fp_8h_html"><div class="ttname"><a href="diy-fp_8h.html">diy-fp.h</a></div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_ace039ddd219c9dd57b193efb58064d46"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#ace039ddd219c9dd57b193efb58064d46">double_conversion::Single::LowerBoundaryIsCloser</a></div><div class="ttdeci">bool LowerBoundaryIsCloser() const </div><div class="ttdef"><b>Definition:</b> ieee.h:363</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html"><div class="ttname"><a href="classdouble__conversion_1_1_single.html">double_conversion::Single</a></div><div class="ttdef"><b>Definition:</b> ieee.h:261</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a7888821c975e330ee2dfafd15695b5da"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a7888821c975e330ee2dfafd15695b5da">double_conversion::Double::kSignMask</a></div><div class="ttdeci">static const uint64_t kSignMask</div><div class="ttdef"><b>Definition:</b> ieee.h:44</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_af4a893a449b4d20f1f12e42ff94487a8"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#af4a893a449b4d20f1f12e42ff94487a8">double_conversion::Double::kSignificandSize</a></div><div class="ttdeci">static const int kSignificandSize</div><div class="ttdef"><b>Definition:</b> ieee.h:49</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a6ccbe37920ceb2dd36be89ddf39c905c"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a6ccbe37920ceb2dd36be89ddf39c905c">double_conversion::Double::value</a></div><div class="ttdeci">double value() const </div><div class="ttdef"><b>Definition:</b> ieee.h:200</div></div>
<div class="ttc" id="classdouble__conversion_1_1_diy_fp_html_ae34c561a7915ffd25adaf62f4e673289"><div class="ttname"><a href="classdouble__conversion_1_1_diy_fp.html#ae34c561a7915ffd25adaf62f4e673289">double_conversion::DiyFp::kSignificandSize</a></div><div class="ttdeci">static const int kSignificandSize</div><div class="ttdef"><b>Definition:</b> diy-fp.h:42</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a89c490ea598cec85ab4d9fcdf141b6ac"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a89c490ea598cec85ab4d9fcdf141b6ac">double_conversion::Double::Exponent</a></div><div class="ttdeci">int Exponent() const </div><div class="ttdef"><b>Definition:</b> ieee.h:111</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a15a2145f28721f6627753283ff1327ca"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a15a2145f28721f6627753283ff1327ca">double_conversion::Single::Single</a></div><div class="ttdeci">Single(float f)</div><div class="ttdef"><b>Definition:</b> ieee.h:271</div></div>
<div class="ttc" id="namespacedouble__conversion_html"><div class="ttname"><a href="namespacedouble__conversion.html">double_conversion</a></div><div class="ttdef"><b>Definition:</b> bignum-dtoa.h:33</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a67732f15bf4b75886b8a43f348df7cdc"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a67732f15bf4b75886b8a43f348df7cdc">double_conversion::Double::LowerBoundaryIsCloser</a></div><div class="ttdeci">bool LowerBoundaryIsCloser() const </div><div class="ttdef"><b>Definition:</b> ieee.h:187</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_ae9e8d15a9beef8ec82cf3ade30a64601"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#ae9e8d15a9beef8ec82cf3ade30a64601">double_conversion::Single::NormalizedBoundaries</a></div><div class="ttdeci">void NormalizedBoundaries(DiyFp *out_m_minus, DiyFp *out_m_plus) const </div><div class="ttdef"><b>Definition:</b> ieee.h:340</div></div>
<div class="ttc" id="classdouble__conversion_1_1_single_html_a6ea38028bc99c784704bfc0003e9deed"><div class="ttname"><a href="classdouble__conversion_1_1_single.html#a6ea38028bc99c784704bfc0003e9deed">double_conversion::Single::Single</a></div><div class="ttdeci">Single(uint32_t d32)</div><div class="ttdef"><b>Definition:</b> ieee.h:272</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_a1c8c3f7b2aad3cbcf6012b8e944c02f6"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#a1c8c3f7b2aad3cbcf6012b8e944c02f6">double_conversion::Double::Double</a></div><div class="ttdeci">Double()</div><div class="ttdef"><b>Definition:</b> ieee.h:51</div></div>
<div class="ttc" id="classdouble__conversion_1_1_double_html_abeea5defb0d252a0428e247d5715e67b"><div class="ttname"><a href="classdouble__conversion_1_1_double.html#abeea5defb0d252a0428e247d5715e67b">double_conversion::Double::kExponentMask</a></div><div class="ttdeci">static const uint64_t kExponentMask</div><div class="ttdef"><b>Definition:</b> ieee.h:45</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 18 2016 17:22:37 for XenC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
